import request from '@/utils/request'

export function getCategoryList(data) {
  return request({
    url: '/product/category/list',
    method: 'get',
    data
  })
}

export function postCategory(data) {
  return request({
    url: '/product/category',
    method: 'post',
    data
  })
}

export function putCategory(data) {
  return request({
    url: '/product/category',
    method: 'put',
    data
  })
}

export function deleteCategory(data) {
  return request({
    url: '/product/category',
    method: 'delete',
    data
  })
}

export function getProductList(data) {
  return request({
    url: '/product/list',
    method: 'get',
    data
  })
}

export function postProduct(data) {
  return request({
    url: '/product',
    method: 'post',
    data
  })
}

export function putProduct(data) {
  return request({
    url: '/product',
    method: 'put',
    data
  })
}

export function deleteProduct(data) {
  return request({
    url: '/product',
    method: 'delete',
    data
  })
}
export function getProductAttrGroupList(data) {
  return request({
    url: '/product/attr_group/list',
    method: 'get',
    data
  })
}

export function postProductAttrGroup(data) {
  return request({
    url: '/product/attr_group',
    method: 'post',
    data
  })
}

export function putProductAttrGroup(data) {
  return request({
    url: '/product/attr_group',
    method: 'put',
    data
  })
}

export function deleteProductAttrGroup(data) {
  return request({
    url: '/product/attr_group',
    method: 'delete',
    data
  })
}
